package com.sljy.hzk.view.dialog;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.sljy.hzk.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created  on 2018/7/4 0004
 *
 * @author 唐开阔
 * @describe 提示框Diglog
 */
public class HintDialog extends BaseDialog {
    OnSureListener listener;
    @BindView(R.id.tv_mes)
    TextView tvMes;

    public void setListener(OnSureListener listener) {
        this.listener = listener;
    }

    @Override
    public int getLayoutRes() {
        return R.layout.dialog_exam_back_hint;
    }

    @Override
    public void bindView(View v) {

    }

    @OnClick(R.id.tv_back)
    void back() {
        dismiss();
    }

    @OnClick(R.id.tv_back)
    void tv_sure() {
        dismiss();
        if (listener != null) {
            listener.onSure();
        }

    }
    public void show(FragmentManager manager,String mes){

        super.show(manager); tvMes.setText(mes);

    }

    public interface OnSureListener {
        void onSure();
    }
}
